package com.quickcancellation.crm.pojo.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class LoginDto {

    int code;

    String msg;

    public static LoginDto success(){

        return new LoginDto(200,"登录成功");
    }
    public static LoginDto fail(int code,String msg){
        return new LoginDto(code,msg);
    }

    public static LoginDto fail(){
        return LoginDto.fail(-10001,"登录失败");
    }

    public static LoginDto logout(){
        return new LoginDto(200,"退出登录成功");
    }


}
